package com.ybwh.springboot2.example;


import com.ybwh.springboot2.common.RespData;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import java.time.LocalDateTime;

@Api(tags="常见例子")
@RestController
@RequestMapping("/example")
public class ExampleController {


    @ApiOperation(value = "字段打码和枚举名称显示",notes = "")
    @RequestMapping(value = "/mask", method = RequestMethod.GET)
    public RespData<Person> mask() {
        Person p = new Person();
        p.setAge(30);
        p.setName("mikesrytryeruututututtu");
        p.setBirthday(LocalDateTime.now());
        p.setHoby(HobyEnum.basketball.getCode());

        return RespData.successResp(p);
    }
}
